package com.edu.enums;

import java.util.HashMap;
import java.util.Map;

public enum Queue {
	
	QUEUE_TEST("queue_test","测试队列"),
	QUEUE_EMAIL("queue_email","邮件"),
	QUEUE_SMS("queue_sms","短信");
	
	private String name;
	private String text;
	private static Map<String,String> map = new HashMap<String,String>();
	
	static {
		Queue[] queue = Queue.values();
		for(Queue q:queue){
			map.put(q.getName(), q.getText());
		}
	}
	
	public static String get(String name){
		return map.get(name);
	}
	
	private Queue(String pName, String pText) {
		name = pName;
		text = pText;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String pName) {
		name = pName;
	}
	public String getText() {
		return text;
	}
	public void setText(String pText) {
		text = pText;
	}
	
	

}
